package com.example.springcloud.infra.feign;

import com.example.springcloud.entities.CommonResult;
import com.example.springcloud.entities.Payment;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Service
@FeignClient(value = "CLOUD-PAYMENT-SERVICE"/*,fallback = DemoInstanceFeignClientFallback.class*/)
public interface DemoInstanceFeignClient {

    @GetMapping("/payment/get/{id}")
    public CommonResult getPayment(@PathVariable("id")Long id);


    @GetMapping(value = "/payment/discovery")
    public Object discovery();
}
